﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Threading;

namespace PsomlGui
{
    public partial class EntrezBrowserLauncherForm : Form
    {
        public string EntrezBrowserExecutablePath { get; set; }
        
        public EntrezBrowserLauncherForm()
        {
            InitializeComponent();
        }

        private void EntrezBrowserLauncherForm_Load(object sender, EventArgs e)
        {
            var thread = new Thread(() =>
                                        {
                                            var entrezBrowserProcess = new Process();
                                            entrezBrowserProcess.StartInfo.FileName = EntrezBrowserExecutablePath;
                                            entrezBrowserProcess.Start();
                                            entrezBrowserProcess.WaitForExit();
                                            DialogResult = DialogResult.OK;
                                        });
            thread.Start();

        }
    }
}
